#ifndef NYU_ARRAY_H_
#define NYU_ARRAY_H_

#include "nyu_object.h"

/* Array用のプロトタイプ */
extern NyuObject *nyu_array_proto;

#define NYU_ARRAY(X) ((NyuArray *)(X))

struct NyuArray {
    NyuObject base;
    GPtrArray *array;
};

#define nyu_array_index(self,idx) (g_ptr_array_index((self)->array, idx))
#define nyu_array_length(self) ((self)->array->len)

void nyu_array_initialize();
void nyu_array_finalize();

NyuArray *nyu_array_new();
NyuArray *nyu_array_sized_new(long len);

#endif /* NYU_ARRAY_H_ */
